package edu.yngsxy.wxdemo.sys.model.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import edu.yngsxy.wxdemo.core.model.entity.WkBaseEntity;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import jakarta.validation.constraints.*;
import io.swagger.v3.oas.annotations.media.Schema;
/**
 * <p>
 * 用户角色：给用户分配角色
 * </p>
 *
 * @author dsb
 * @since 2025-09-09
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("sys_user_role")
@Schema(description = "用户角色：给用户分配角色")
public class SysUserRole extends WkBaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 用户ID：字段值来源于用户表sys_user的id字段值
     */
    @TableField("user_id")
    @Schema(title = "用户ID", description = "字段值来源于用户表sys_user的id字段值", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    private Integer userId;

    /**
     * 角色ID：字段值来源于角色表sys_role表的id字段值
     */
    @TableField("role_id")
    @Schema(title = "角色ID", description = "字段值来源于角色表sys_role表的id字段值", requiredMode =Schema.RequiredMode.NOT_REQUIRED)
    private Integer roleId;
}
